package com.yl.users.mapper

import com.baomidou.mybatisplus.core.mapper.BaseMapper
import com.yl.users.entity.CompanyPermissionsView
import com.yl.users.entity.CompanyRolePermissions
import com.yl.users.pojo.dto.CompanyPermissionsDto
import com.yl.users.pojo.vo.CompanyPermissionsViewSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param
@Mapper
interface CompanyRolePermissionsMapper : BaseMapper<CompanyRolePermissions> {

    /**
     * 清除没有权限的角色权限关联 （角色-公司权限）
     */
    fun refreshRolePerm()

    /**
     * 获取角色所有的权限id
     */
    fun selectRolePermIds(@Param("roleId")roleId: Long): List<Long>

    /**
     * 获取角色的权限
     */
    fun selectRolePermList(@Param("roleId")roleId: Long,@Param("vo") vo: CompanyPermissionsViewSelectVo): List<CompanyPermissionsView>
}